home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00089_Tooltip text behavior.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.3 KB  |  62 lines

  1. property pSpr, pLastLoc
  2. global gReminderToolTipTimer, gLastForcedRollover
  3.  
  4. on beginSprite me
  5.   pSpr = sprite(me.spriteNum)
  6.   pSpr.locH = 1000
  7.   pSpr.locZ = 125
  8.   customFont(pSpr.member)
  9. end
  10.  
  11. on mShowToolTip me, rollSprite, tipText, tipLoc, overRide, forceRelocation
  12.   if ticksSince(gReminderToolTipTimer) < 0 then
  13.     if not overRide then
  14.       if voidp(gLastForcedRollover) then
  15.         exit
  16.       else
  17.         if rollSprite <> gLastForcedRollover then
  18.           exit
  19.         end if
  20.       end if
  21.     end if
  22.   end if
  23.   if pSpr.member.text <> tipText then
  24.     if tipLoc <> pSpr.loc then
  25.       pSpr.locH = 1000
  26.       updateStage()
  27.     end if
  28.     pSpr.member.text = tipText
  29.     pSpr.loc = tipLoc
  30.     pLastLoc = tipLoc
  31.   else
  32.     if forceRelocation and (pSpr.loc <> tipLoc) then
  33.       pSpr.loc = tipLoc
  34.       pLastLoc = tipLoc
  35.     else
  36.       pSpr.loc = pLastLoc
  37.     end if
  38.   end if
  39. end
  40.  
  41. on mHideToolTip me, overRide
  42.   if overRide then
  43.     pSpr.locH = 1000
  44.   else
  45.     if ticksSince(gReminderToolTipTimer) < 0 then
  46.       if voidp(gLastForcedRollover) then
  47.         exit
  48.       else
  49.         if the rollOver <> gLastForcedRollover.spriteNum then
  50.           exit
  51.         end if
  52.       end if
  53.     end if
  54.   end if
  55.   pSpr.locH = 1000
  56. end
  57.  
  58. on endSprite me
  59.   pSpr.locH = 1000
  60.   pSpr.locZ = me.spriteNum
  61. end
  62.